package oodayZY02;

public class Car {
    String brand;
    String color;
    double price;
    Car(){}
    Car(String brand,String color,double price){
        this.brand=brand;
        this.price=price;
        this.color=color;
    }
   void run(){
       System.out.println("有一辆大约"+price+"万元的"+color+"的"+brand+"车跑过去了！");

   }
   void stop(){
       System.out.println("有一辆大约"+price+"万元的"+color+"的"+brand+"车停在前面了");

   }














    /*
    String brand;
    String color;
    double price;
    Car(){

    }
    Car(String brand,String color,double price){
        this.brand=brand;
        this.color=color;
        this.price=price;

    }
    void run(){
        System.out.println("有一辆大约"+price+"万元的"+color+"的"+brand+"车跑过去了！");
    }
    void stop(){
        System.out.println("有一辆大约"+price+"万元的"+color+"的"+brand+"车停在前面了");

    }

     */

}
